3.158 \(\int \frac{\sec ^3(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx\)

Optimal. Leaf size=34 \[ \frac{\tan (c+d x)}{a d}-\frac{i \sec ^2(c+d x)}{2 a d} \]

[Out]

((-I/2)*Sec[c + d*x]^2)/(a*d) + Tan[c + d*x]/(a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.107244, antiderivative size = 34, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.194, Rules used = {3092, 3090, 3767, 8, 2606, 30} \[ \frac{\tan (c+d x)}{a d}-\frac{i \sec ^2(c+d x)}{2 a d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^3/(a*Cos[c + d*x] + I*a*Sin[c + d*x]),x]

[Out]

((-I/2)*Sec[c + d*x]^2)/(a*d) + Tan[c + d*x]/(a*d)

Rule 3092

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[a^n*b^n, Int[Cos[c + d*x]^m/(b*Cos[c + d*x] + a*Sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, m},
x] && EqQ[a^2 + b^2, 0] && ILtQ[n, 0]

Rule 3090

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Sym
bol] :> Int[ExpandTrig[cos[c + d*x]^m*(a*cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] &&
 IntegerQ[m] && IGtQ[n, 0]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{\sec ^3(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx &=-\frac{i \int \sec ^3(c+d x) (i a \cos (c+d x)+a \sin (c+d x)) \, dx}{a^2}\\ &=-\frac{i \int \left (i a \sec ^2(c+d x)+a \sec ^2(c+d x) \tan (c+d x)\right ) \, dx}{a^2}\\ &=-\frac{i \int \sec ^2(c+d x) \tan (c+d x) \, dx}{a}+\frac{\int \sec ^2(c+d x) \, dx}{a}\\ &=-\frac{i \operatorname{Subst}(\int x \, dx,x,\sec (c+d x))}{a d}-\frac{\operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{a d}\\ &=-\frac{i \sec ^2(c+d x)}{2 a d}+\frac{\tan (c+d x)}{a d}\\ \end{align*}

Mathematica [A]  time = 0.183829, size = 35, normalized size = 1.03 \[ -\frac{i \sec (c+d x) (\sec (c+d x)+2 i \sec (c) \sin (d x))}{2 a d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^3/(a*Cos[c + d*x] + I*a*Sin[c + d*x]),x]

[Out]

((-I/2)*Sec[c + d*x]*(Sec[c + d*x] + (2*I)*Sec[c]*Sin[d*x]))/(a*d)

________________________________________________________________________________________

Maple [A]  time = 0.135, size = 26, normalized size = 0.8 \begin{align*}{\frac{\tan \left ( dx+c \right ) -{\frac{i}{2}} \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{ad}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c)),x)

[Out]

1/d/a*(tan(d*x+c)-1/2*I*tan(d*x+c)^2)

________________________________________________________________________________________

Maxima [B]  time = 1.18713, size = 146, normalized size = 4.29 \begin{align*} \frac{2 \,{\left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{i \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac{\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{{\left (a - \frac{2 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac{a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}\right )} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="maxima")

[Out]

2*(sin(d*x + c)/(cos(d*x + c) + 1) - I*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - sin(d*x + c)^3/(cos(d*x + c) + 1)
^3)/((a - 2*a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4)*d)

________________________________________________________________________________________

Fricas [A]  time = 0.438385, size = 88, normalized size = 2.59 \begin{align*} \frac{2 i}{a d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="fricas")

[Out]

2*I/(a*d*e^(4*I*d*x + 4*I*c) + 2*a*d*e^(2*I*d*x + 2*I*c) + a*d)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**3/(a*cos(d*x+c)+I*a*sin(d*x+c)),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [A]  time = 1.16536, size = 36, normalized size = 1.06 \begin{align*} -\frac{i \, \tan \left (d x + c\right )^{2} - 2 \, \tan \left (d x + c\right )}{2 \, a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(I*tan(d*x + c)^2 - 2*tan(d*x + c))/(a*d)